/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.faytechcc.csc251.db;

import java.io.File;
import java.util.Scanner;

/**
 *
 * @author kent
 */
public class DBLogicTest {
    public static void main(String[] args)
            throws Exception
    {
        Scanner scanner = new Scanner(new File("MTGCards(fixed).csv"));
            String line;
            String name;
            String setName;
            String id;
            String type;
            String power;
            String toughness;
            String manacost;
            String cmc;
            String color;
            String rarity;
            String ability;
            while (scanner.hasNextLine())
            {
              try
              {
              line = scanner.nextLine();
              String[] cardStrings;
              cardStrings = line.split("\\|");
              name = cardStrings[0];
              setName = cardStrings[1];
              id = cardStrings[2];
              type = cardStrings[3];
              power = cardStrings[4];
              toughness = cardStrings[5];
              manacost = cardStrings[6];
              cmc = cardStrings[7];
              color = cardStrings[8];
              rarity = cardStrings[9];
              ability = cardStrings[10];
              System.out.println(name + "|" +
                      setName + "|" +
                      id + "|" +
                      type + "|" +
                      power + "|" +
                      toughness+ "|" +
                      manacost + "|" +
                      cmc + "|" +
                      color + "|" +
                      rarity + "|" +
                      ability + "|");
              System.out.println(cardStrings.length);
            }
              catch(Exception ex)
                      {
                          
                      }
            }
    }
}
